<template>
  <div class="bizu">
    <!-- bizu活动 -->
    <div class="bizuActive_parent">
      <div class="bizuActive">
        <div class="bizuActive_title">
          {{$t('myAdd.home.bizuActive')}}
        </div>
        <div class="bizuActive_title_En">{{$t('myAdd.home.bizuActivityDes')}}</div>
        <div class="bizuActive_img">
          <div class="bizuActive_img_tab pointer">
            <router-link to="/personal/invitation">
              <div>
                <img src="../../../../assets/addImg/home/invitation.png" alt="">
              </div>
              <p>{{$t('myAdd.home.inviteMining')}}</p>
            </router-link>
          </div>
          <div class="bizuActive_img_tab pointer" v-if="public_info.exOpen === '1'">
            <a :href="http + webSiteInfo.ex_pc_url + '/candyTask'">
              <div>
                <img src="../../../../assets/addImg/home/candy2.png" alt="">
              </div>
              <p>{{$t('myAdd.home.candyBox')}}</p>
            </a>
          </div>
          <div class="bizuActive_img_tab pointer" v-if="public_info.exOpen === '1'">
            <a :href="http + webSiteInfo.ex_pc_url + '/bideli'">
              <div>
                <img src="../../../../assets/addImg/home/saveMoney.png" alt="">
              </div>
              <p>{{$t('myAdd.bideli.saveMoneyLive')}}</p>
            </a>
          </div>
          <div class="bizuActive_img_tab pointer" v-if="public_info.exOpen === '1'">
            <a :href="http + webSiteInfo.ex_pc_url + '/openPlatform'">
              <div>
                <img src="../../../../assets/addImg/home/rebate.png" alt="">
              </div>
              <p>{{$t('myAdd.home.openServer')}}</p>
            </a>
          </div>
        </div>
      </div>
    </div>
    <!-- app下载 -->
    <div class="bizuMiddle">
      <div class="app">
        <div class="app_left">
          <div class="app_left_div">
            <img src="../../../../assets/addImg/home/download.png" alt="">
          </div>
        </div>
        <div class="app_right">
          <p class="app_right_down">{{$t('myAdd.home.down')}}</p>
          <p>{{$t('myAdd.appdown.des1')}}&nbsp;&nbsp;&nbsp;{{$t('myAdd.appdown.des2')}}</p>
          <div>
            <div class="qrCode">
              <img src="../../../../assets/addImg/home/QrCodeDownload.jpg" alt="">
            </div>
            <div class="btn">
              <button class="ios" @mouseenter="iosHoverEnter" @mouseleave="iosHoverLeave" ref="iosBtn">{{$t('myAdd.home.ios')}}</button>
              <br/>
              <button class="android"><a href="https://bizu-local.oss-cn-beijing.aliyuncs.com/Bizu-Android.apk">{{$t('myAdd.home.android')}}</a></button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'bizuActive',
  data () {
    return {
      http: location.protocol + '//',
      webSiteInfo: null
    }
  },
  computed: {
    ...mapState({
      public_info ({baseData}) {
        if (baseData._lanList) {
          this.webSiteInfo = baseData._webSiteInfo
          return baseData
        } else {
          return false
        }
      }
    })
  },
  methods: {
    iosHoverEnter () {
      this.$refs.iosBtn.innerText = this.$t('myAdd.home.iosTip')
    },
    iosHoverLeave () {
      this.$refs.iosBtn.innerText = this.$t('myAdd.home.ios')
    }
  }
}
</script>

